    
    function generateadv_context() {    
     $.getJSON("/ajax/generateadvcontext", {type: $('#select2').val(), site: $('#select3').val(), width: $('#sDec1').val(), height: $('#sDec2').val()}, 
        function(data) {          
                   
          var insertCode = '<!--BANNER -->' +
    '<script type="text/javascript" src="https://raw.github.com/headjs/headjs/v0.96/dist/head.js"></script>' +
    '<script>' +
    'head.js(' +        
        '"/js/our_js/send_data.js",' +
        'function() {' +
            'var code =' + '"' + data.res[0].code + '"' + ';' +
            'getAdver(code);' +
        '});' +
    '</script>' +         
    '<div id="div_banner_id">' +        
    '</div>' +
    '<!-- END BANNER -->';
            $('.showCodeJSS').text(insertCode);
        }
    );
        
var font_weight = 'font-weight: none;';
var font_style = 'font-style: none;';
var text_decoration = 'text-decoration: none;';

if ($('#check_B').attr("checked")){
    var font_weight = 'font-weight: bold;';
    };

if ($('#check_I').attr("checked")){
    var font_style = 'font-style: italic;';
    };

if ($('#check_U').attr("checked")){
    var text_decoration = 'text-decoration: underline;';
    };
//шрифт
var font = $('#select_font').val();
var font_family = 'font-family: ' + font + ';';

//розмер шрифта
var size = $('#select_size').val();
var font_size = 'font-size: ' + size + 'px;';

var color = $('#hex').val();
var bgcolor = $('#hexBg').val();
        
        
    $.getJSON("/ajax/savestylesettings", {site: $('#select3').val(), font_weight: font_weight, font_style: font_style, text_decoration: text_decoration, font_family: font_family, font_size: font_size, color: color, bgcolor: bgcolor}, 
        function(data) {  
            
        }
    );
    
    

}// end generateadv_context
    
